<?php $resUniversity = ($objUniversity -> selectFeatureUniversity());

//$recUniversity=mysqli_fetch_array($resUniversity);
//print_r($resUniversity); exit;
//echo $resUniversity[0]->university_name; exit;
$total = count($resUniversity);
$z = 0;
$c = 4;
$b = 0;
//$total=10;

if (($total % 4) == 0) {
	$ttoal = $total / 4;
} else {
	$ttoal = (intval($total / 4)) + 1;
}
?>
<div class="college-section">
	<section class="carousel-holder">
		<h2>College &amp; Universities</h2>
		<div class="carousel">
			<ul id="bxcarousel">
				<?php for($i=0; $i<$ttoal; $i++){ ?>
				<li>
				<?php for($a=$b;$a<$c;$a++){
				if($a<$c){  $arr=$z++;

				//echo $resUniversity[$arr]->university_name; exit;
				?>

				<ul>
				<li>
					<a href="universityList.php?action=universityDetails&uId=<?php echo $resUniversity[$arr] -> university_id; ?>">
					<img src="uploads/university/<?php echo $resUniversity[$arr] -> university_image; ?>" width="220px" height="169px"  alt="<?php echo $resUniversity[$arr] -> university_name; ?>" />
					<p ><?php echo $resUniversity[$arr] -> university_name; ?></p>
					</a>
				</li>
			</ul>

			<?php } 
			else{
				$b=$c;
				$c=$c+4;
				}
			}
			?>
			</li>

			<?php } ?>
			</ul>
	</section>
</div>

